import { request } from '@/http/request/alova'

interface getOrderListVo {
  pageNo: number
  pageSize: number
  number?: string
  status?: string
}
export function getOrderList(params: getOrderListVo) {
  return request.Get(`/worker/repair/order/list`, { params, meta:{original: true} })
}
export function orderSetOff(params: { orderId: number }) {
  return request.Get(`/worker/repair/order/start`, { params, meta:{original: true} })
}
export function uploadWorkerLocation(data: { latitude: number, longitude: number }) {
  return request.Post(`/worker/user/location/report`, data )
}
export function arriveUpload(params: { orderId: number, latitude: number, longitude: number }) {
  return request.Get(`/worker/repair/order/arrive`, { params, meta:{original: true} } )
}
export function orderRepairProcess(params: { orderId: number }) {
  return request.Get(`/worker/repair/order/processing`, { params, meta:{original: true} } )
}
export function completeRepair(params: { orderId: number, completionPhotoUrl: string, completionDesc: string }) {
  return request.Get(`/worker/repair/order/completed`, { params, meta:{original: true} } )
}
